package com.starlight.flower_server.infrastructure.repository;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.starlight.flower_server.controller.exception.NotFoundException;
import com.starlight.flower_server.domain.comment.cqrs.CommentPageQuery;
import com.starlight.flower_server.infrastructure.entity.Comment;

import java.util.List;

/**
 * @Author yfy2001
 * @date 2023/4/17 20:07
 */
public interface CommentRepository {

    Comment queryDetail(Long id) throws NotFoundException;

    Integer logicDelete(Long id);

    Integer insert(Comment comment);

    Integer modify(Comment comment);

    IPage<Comment> queryPage(CommentPageQuery query);

    List<Comment> queryAll();

    Integer removeAllByArticleId(Long articleId);

    Long queryTotalCount();

    List<Comment> queryListByArticleId(Long articleId);
}
